/*
 * @Author: your name
 * @Date: 2022-03-29 14:28:42
 * @LastEditTime: 2022-04-22 16:34:35
 * @LastEditors: your name
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \operation-platform-ui\src\api\auth.js
 */
/**
 * 登录相关接口
 */
// import { request, getDomain } from '@/api';
import request from '@/utils/request';
import qs from "qs";

export const loginByUsername = (username, password,url) => {
  const data = {
    username: username,
    password: password
  };
  // let body;
  // return request('post', getDomain() + process.env.VUE_APP_TOKEN_URL, body, data, {});
  return request({url:url, method: 'post', data: qs.stringify(data)});
};

export const logout = token => {
  // const data = {
  //   access_token: token,
  //   client_id: process.env.VUE_APP_CLIENT_ID,
  //   client_secret: process.env.VUE_APP_CLIENT_SECRET
  // };
  // // let body;
  // return request({method : 'delete', url : process.env.VUE_APP_TOKEN_URL, data : qs.stringify(data)});
};
